import QtQuick 2.12
import QtQuick.Layouts 1.12

RowLayout {
    Layout.alignment: Qt.AlignRight
    Text {
        id: time;
        color: "#fff";
        font.pointSize: 22;

    }
    ColumnLayout {
        Text {
            id: week
            color: "#fff";

        }
        Text {
            id: day
            color: "#fff";
        }
    }
    Timer {
        interval: 1000;
        running: true;
        repeat: true;
        onTriggered: {
            var locale = Qt.locale("zh_CN");
            var datetime = new Date();
            time.text = datetime.toLocaleString(locale, "hh:mm")
            week.text =  datetime.toLocaleString(locale, "ddd");
            day.text = datetime.toLocaleString(locale, "yyyy/MM/dd");
        }

    }
}
